package com.quanxiaoha.framework.common.validator;

import jakarta.validation.Constraint;
import jakarta.validation.Payload;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;


/**
 * @Author: jingyan_liu
 * @CreateTime: 2025-07-09
 * @Description:
 * @Version: 1.0
 */

@Target({ElementType.METHOD, ElementType.FIELD, ElementType.ANNOTATION_TYPE, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = PhoneNumberValidator.class)
public @interface PhoneNumber {
	
	String message() default "手机号格式不正确, 需为 11 位数字";
	
	Class<?>[] groups() default {};
	
	Class<? extends Payload>[] payload() default {};
}